1400 |
Is it possible to define my values for sorting
(axG2antt1.Columns.Add("C1") as EXG2ANTTLib.Column).SortType = EXG2ANTTLib.SortTypeEnum.SortUserDataString; axG2antt1.Columns.Add("C2"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Cell 1"); var_Items.set_CellData(h,0,"3.your extra data"); var_Items.set_CellValue(h,1,"SortValue=3"); h = var_Items.AddItem("Cell 1.1"); var_Items.set_CellData(h,0,"1.your extra data"); var_Items.set_CellValue(h,1," SortValue=1"); h = var_Items.AddItem("Cell 1.2"); var_Items.set_CellData(h,0,"5.your extra data"); var_Items.set_CellValue(h,1," SortValue=5"); h = var_Items.AddItem("Cell 1.3"); var_Items.set_CellData(h,0,"2.your extra data"); var_Items.set_CellValue(h,1," SortValue=2"); |
1399 |
I have multiple dropdown lists, that are depending on each other, that means that the values in dropdown list no. 2 is based on the users selection in dropdown list no 1. How can I do this
// EditOpen event - Occurs when the edit operation starts. private void axG2antt1_EditOpen(object sender, EventArgs e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; object v = var_Items.get_CellValue(var_Items.FocusItem,0); string c = var_Items.get_CellCaption(var_Items.FocusItem,0); EXG2ANTTLib.Editor var_Editor = axG2antt1.Columns[1].Editor; var_Editor.ClearItems(); var_Editor.AddItem(v,c.ToString(),null); } //this.axG2antt1.EditOpen += new EventHandler(this.axG2antt1_EditOpen); axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("DropDownList") as EXG2ANTTLib.Column); EXG2ANTTLib.Editor var_Editor = var_Column.Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.DropDownListType; var_Editor.AddItem(1,"First",null); var_Editor.AddItem(2,"Second",null); var_Editor.AddItem(3,"Third",null); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; (axG2antt1.Columns.Add("DropDownList-Related") as EXG2ANTTLib.Column).Editor.EditType = EXG2ANTTLib.EditTypeEnum.DropDownListType; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem(1),1,-1); var_Items.set_CellValue(var_Items.AddItem(2),1,-1); var_Items.set_CellValue(var_Items.AddItem(3),1,-1); var_Items.set_LockedItemCount(EXG2ANTTLib.VAlignmentEnum.exBottom,1); int h = var_Items.get_LockedItem(EXG2ANTTLib.VAlignmentEnum.exBottom,0); var_Items.set_ItemDivider(h,0); var_Items.set_ItemDividerLineAlignment(h,EXG2ANTTLib.DividerAlignmentEnum.DividerTop); var_Items.set_CellEditorVisible(h,0,EXG2ANTTLib.EditorVisibleEnum.exEditorHidden); var_Items.set_CellSingleLine(h,0,EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap); var_Items.set_CellValueFormat(h,0,EXG2ANTTLib.ValueFormatEnum.exHTML); var_Items.set_CellValue(h,0,"The drop down editor in the second column is filled during the <b>EditOpen event</b>, and the values are based on the selection" + " on the first column."); axG2antt1.EndUpdate(); |
1398 |
Is it possible background color displayed when the mouse passes over an item
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Def"); axG2antt1.HotBackColor = Color.FromArgb(0,0,128); axG2antt1.HotForeColor = Color.FromArgb(255,255,255); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Item A"); var_Items.AddItem("Item B"); var_Items.AddItem("Item C"); axG2antt1.EndUpdate(); |
1397 |
Is it possible to magnify a specified date and apply a different background color
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.DrawLevelSeparator = EXG2ANTTLib.LevelLineEnum.exLevelNoLine; var_Chart.set_PaneWidth(false,64); var_Chart.FirstVisibleDate = Convert.ToDateTime("11/23/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 3; var_Chart.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday; var_Chart.AllowInsideZoom = true; var_Chart.InsideZooms.Add(Convert.ToDateTime("11/29/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US"))).AllowCustomFormat = true; EXG2ANTTLib.InsideZoom var_InsideZoom = var_Chart.InsideZooms[Convert.ToDateTime("11/29/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US"))]; var_InsideZoom.Width = 68; var_InsideZoom.CustomFormat.BackColorChart = (uint)ColorTranslator.ToWin32(Color.FromArgb(224,224,224)); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hA = var_Items.AddItem("Task A"); var_Items.AddBar(hA,"Task",Convert.ToDateTime("11/24/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("11/26/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); int hB = var_Items.AddItem("Task B"); var_Items.AddBar(hB,"Task",Convert.ToDateTime("11/28/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("12/1/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddLink("LinkAB",hA,"A",hB,"B"); var_Items.set_Link("LinkAB",EXG2ANTTLib.LinkPropertyEnum.exLinkStyle,2); var_Items.set_Link("LinkAB",EXG2ANTTLib.LinkPropertyEnum.exLinkWidth,2); axG2antt1.EndUpdate(); |
1396 |
Could you please tell me how to add multiple bars to the one line
axG2antt1.BeginUpdate(); axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/6/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.AddLink("AB",h,"A",h,"B"); axG2antt1.EndUpdate(); |
1395 |
My development environment does not have any Object,GetOcx,DefaultDispatch,GetControlUnknown,nativeObject, ... property, is there any alternative I can pass the component to PrintExt so I can get printed
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos,0); axG2antt1.EndUpdate(); axG2antt1.Template = "Dim p;p = CreateObject(`Exontrol.Print`);p.PrintExt = Me;p.AutoRelease = False;p.Preview();"; |
1394 |
My development environment does not have any Object,GetOcx,DefaultDispatch,GetControlUnknown,nativeObject, ... property, is there any alternative I can pass the component to PrintExt so I can get printed
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos,0); axG2antt1.EndUpdate(); // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. EXPRINTLib.Print var_Print = new EXPRINTLib.Print(); var_Print.PrintExt = (axG2antt1.ExecuteTemplate("me") as EXG2ANTTLib.G2antt); var_Print.Preview(); |
1393 |
Is it possible to display the bar's captions or labels with a different font/size
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); axG2antt1.DefaultItemHeight = 24; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,64); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Default"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","This is a the control's font"); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); h = var_Items.AddItem("Smaller"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","<font ;5>This is a the control's font with a smaller size"); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); h = var_Items.AddItem("Larger"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","<font ;15>This is a the control's font with a larger size"); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); h = var_Items.AddItem("Tahoma 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","<font Tahoma>This is using a Tahoma font"); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); h = var_Items.AddItem("Tahoma 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","<font Tahoma;14>This is using a <b>Tahoma</b> font with a different size"); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); axG2antt1.EndUpdate(); |
1392 |
How can I apply the same ConditionalFormat on more than 1(one) column (multiple columns and not on item)
axG2antt1.BeginUpdate(); EXG2ANTTLib.ConditionalFormat var_ConditionalFormat = axG2antt1.ConditionalFormats.Add("1","K1"); var_ConditionalFormat.BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_ConditionalFormat.ApplyTo = (EXG2ANTTLib.FormatApplyToEnum)0x1; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat1 = axG2antt1.ConditionalFormats.Add("1","K2"); var_ConditionalFormat1.BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_ConditionalFormat1.ApplyTo = (EXG2ANTTLib.FormatApplyToEnum)0x2; axG2antt1.MarkSearchColumn = false; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Column 1"); var_Columns.Add("Column 2"); var_Columns.Add("Column 3"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(null); var_Items.AddItem(null); var_Items.AddItem(null); axG2antt1.EndUpdate(); |
1391 |
Is it possible to change the height for all items at once
axG2antt1.BeginUpdate(); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.Columns.Add("Items"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(0,true); axG2antt1.EndUpdate(); axG2antt1.DefaultItemHeight = 12; axG2antt1.Items.set_ItemHeight(0,12); |
1390 |
Is it possible to include the weekday when displaying the date
axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Tasks"); EXG2ANTTLib.Column var_Column = (var_Columns.Add("Start") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column.FormatColumn = "value + '<font ;6> ' + (weekday(date(value)) case(0:'Sun';1:'Mon';2:'Tue';3:'Wed';4:'Thu';5:'Fri';6:'Sat'))"; EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("End") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column1.FormatColumn = "value + '<font ;6> ' + (weekday(date(value)) case(0:'Sun';1:'Mon';2:'Tue';3:'Wed';4:'Thu';5:'Fri';6:'Sat'))"; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowLinkBars = false; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,256); var_Chart.NonworkingDays = 0; var_Chart.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1389 |
I need my chart to display the end date with on day less. How can I do this (Method 1)
axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Tasks"); (var_Columns.Add("Start") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); EXG2ANTTLib.Column var_Column = (var_Columns.Add("End") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column.FormatColumn = "shortdate(date(value)-1)"; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowLinkBars = false; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,196); var_Chart.NonworkingDays = 0; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1388 |
Is it possible to display my custom time-units
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,0); var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = 0; var_Chart.NonworkingDays = 0; EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0); var_Level.Unit = EXG2ANTTLib.UnitEnum.exDay; var_Level.Count = 16; var_Level.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Level.Label = "<%i%>"; var_Level.FormatLabel = "'Half ' + (1 + (value/16) mod 2)"; EXG2ANTTLib.Level var_Level1 = var_Chart.get_Level(1); var_Level1.Label = "<%i%>"; var_Level1.FormatLabel = "1 + value mod 16"; var_Level1.set_ReplaceLabel(2.ToString(),"<font ;10><B>Y"); var_Chart.AdjustLevelsToBase = true; var_Chart.set_ScrollRange(EXG2ANTTLib.ScrollRangeEnum.exStartDate,0); var_Chart.set_ScrollRange(EXG2ANTTLib.ScrollRangeEnum.exEndDate,31); |
1387 |
Is it possible to add new records and see them in the control's view using the DataSource
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_SelectItem(e.item,true); var_Items.EnsureVisibleItem(e.item); axG2antt1.Edit(0); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); // ButtonClick event - Occurs when user clicks on the cell's button. private void axG2antt1_ButtonClick(object sender, AxEXG2ANTTLib._IG2anttEvents_ButtonClickEvent e) { // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. (axG2antt1.DataSource as ADODB.Recordset).AddNew(null,null); } //this.axG2antt1.ButtonClick += new AxEXG2ANTTLib._IG2anttEvents_ButtonClickEventHandler(this.axG2antt1_ButtonClick); ADODB.Recordset rs = new ADODB.Recordset(); rs.Append("Task",ADODB.DataTypeEnum.adBSTR,0,null,null); rs.Append("Start",ADODB.DataTypeEnum.adDate,0,null,null); rs.Append("End",ADODB.DataTypeEnum.adDate,0,null,null); rs.Open(null,null,null,null,0); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; axG2antt1.DetectAddNew = true; axG2antt1.DetectDelete = true; axG2antt1.DataSource = (rs as ADODB.Recordset); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_LockedItemCount(EXG2ANTTLib.VAlignmentEnum.exTop,1); int h = var_Items.get_LockedItem(EXG2ANTTLib.VAlignmentEnum.exTop,0); var_Items.set_ItemDivider(h,0); var_Items.set_ItemHeight(h,22); var_Items.set_CellValue(h,0,"AddNew"); var_Items.set_CellHasButton(h,0,true); var_Items.set_CellHAlignment(h,0,EXG2ANTTLib.AlignmentEnum.CenterAlignment); |
1386 |
How can I limit the bars to scrolling range only
// CreateBar event - Fired when the user creates a new bar. private void axG2antt1_CreateBar(object sender, AxEXG2ANTTLib._IG2anttEvents_CreateBarEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_ItemBar(e.item,"newbar",EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart,axG2antt1.Chart.get_ScrollRange(EXG2ANTTLib.ScrollRangeEnum.exMinDate)); var_Items.set_ItemBar(e.item,"newbar",EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd,axG2antt1.Chart.get_ScrollRange(EXG2ANTTLib.ScrollRangeEnum.exMaxDate)); } //this.axG2antt1.CreateBar += new AxEXG2ANTTLib._IG2anttEvents_CreateBarEventHandler(this.axG2antt1_CreateBar); axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,56); var_Chart.set_ScrollRange(EXG2ANTTLib.ScrollRangeEnum.exStartDate,Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Chart.set_ScrollRange(EXG2ANTTLib.ScrollRangeEnum.exEndDate,Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Task 1"); var_Items.AddItem("Task 2"); var_Items.AddItem("Task 3"); axG2antt1.EndUpdate(); |
1385 |
How do I get the handle of the last added item
axG2antt1.Columns.Add("Def"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(1); var_Items.AddItem(2); System.Diagnostics.Debug.Print( var_Items[var_Items.ItemCount].ToString() ); |
1384 |
How can I set the charts date format to any other international Format then the US version. I would need "dd.mmm.yyyy" instead of "mmm.d.'yy"
|
1383 |
Is it possible to define the bar colors, and have the cumulative histogram showing the same colors
axG2antt1.BeginUpdate(); axG2antt1.SingleSel = false; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.AllowLinkBars = false; var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/24/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 64; var_Chart.set_PaneWidth(false,128); var_Chart.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping | EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems | EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems | EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistCumulative; var_Bar.HistogramItems = 6; var_Bar.HistogramPattern = var_Bar.Pattern; var_Bar.HistogramCumulativeOriginalColorBars = EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exKeepOriginalColor; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset; axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Project"); var_Items.set_ItemBold(h,true); var_Items.set_SelectableItem(h,false); int h1 = var_Items.InsertItem(h,null,"Item 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); h1 = var_Items.InsertItem(h,null,"Item 2"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); h1 = var_Items.InsertItem(h,null,"Item 3"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"green",null); var_Items.set_ItemBar(h1,"green",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"red",null); var_Items.set_ItemBar(h1,"red",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items.set_ExpandItem(h,true); var_Items.SelectAll(); axG2antt1.EndUpdate(); |
1382 |
How can I hide the values shown in the legend when cumulative histogram is displayed
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 64; var_Chart.set_PaneWidth(false,128); var_Chart.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping | EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems | EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems | EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.HistogramPattern = EXG2ANTTLib.PatternEnum.exPatternSolid; var_Bar.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistCumulative; var_Bar.HistogramItems = 6; var_Bar.HistogramRulerLinesColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(128,0,0)); var_Bar.HistogramBorderColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(1,0,0)); var_Bar.HistogramCumulativeShowLegend = 65535; var_Bar.HistogramCumulativeOriginalColorBars = EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exChangeColor; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Column") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.PartialCheck = true; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Project 1"); var_Items.AddBar(var_Items.InsertItem(h,null,"Item 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.InsertItem(h,null,"Item 2"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.InsertItem(h,null,"Item 3"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.InsertItem(h,null,"Item 4"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_CellState(var_Items[1],0,1); var_Items.set_ExpandItem(h,true); axG2antt1.EndUpdate(); |
1381 |
Is it possible to define the bar colors, and have the cumulative histogram showing the same colors
axG2antt1.BeginUpdate(); axG2antt1.SelBackColor = axG2antt1.BackColor; axG2antt1.SelForeColor = axG2antt1.ForeColor; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 64; var_Chart.set_PaneWidth(false,128); var_Chart.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping | EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems | EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems | EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(128,128,128)); var_Bar.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistCumulative; var_Bar.HistogramItems = 6; var_Bar.HistogramRulerLinesColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(128,0,0)); var_Bar.HistogramBorderColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(1,0,0)); var_Bar.HistogramCumulativeColors = 2; var_Bar.set_HistogramCumulativeColor(0,(uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255))); var_Bar.set_HistogramCumulativeColor(1,(uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255))); var_Bar.HistogramCumulativeOriginalColorBars = EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exChangeColor; var_Bar.HistogramPattern = var_Bar.Pattern; var_Bar.HistogramCumulativeShowLegend = 65535; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Column") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.PartialCheck = true; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Project 1"); var_Items.AddBar(var_Items.InsertItem(h,null,"Item 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.InsertItem(h,null,"Item 2"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.InsertItem(h,null,"Item 3"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.InsertItem(h,null,"Item 4"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_CellState(var_Items[1],0,1); var_Items.set_ExpandItem(h,true); axG2antt1.EndUpdate(); |
1380 |
Is it possible to show the non-working pattern over the bars
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.NonworkingDaysPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal; var_Chart.NonworkingDaysColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,0)); var_Chart.set_PaneWidth(false,40); var_Chart.FirstVisibleDate = Convert.ToDateTime("6/20/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 64; var_Chart.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramBackground | EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems; var_Chart.LevelCount = 2; EXG2ANTTLib.Bars var_Bars = var_Chart.Bars; EXG2ANTTLib.Bar var_Bar = var_Bars.Add("Empty"); var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,0)); var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternFDiagonal; var_Bar.Shape = EXG2ANTTLib.ShapeBarEnum.exShapeSolidFrameless; EXG2ANTTLib.Bar var_Bar1 = var_Bars.Add("Task:Empty"); var_Bar1.Shortcut = "Task"; var_Bar1.HistogramItems = -5; var_Bar1.HistogramCriticalValue = 3; var_Bar1.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverload; var_Bar1.HistogramPattern = var_Bar1.Pattern; var_Bar1.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=%258%> working days bar"); var_Bar1.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Bar1.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); var_Chart.UnitWidthNonworking = -12; var_Chart.get_Level(1).FormatLabel = "weekday(dvalue) in (0,6) ? `` : value"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A"),"Task",Convert.ToDateTime("6/23/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/29/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.AddBar(var_Items.AddItem("Task B"),"Task",Convert.ToDateTime("6/24/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/28/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); axG2antt1.EndUpdate(); |
1379 |
I'm showing values from a ado recordset from sql 2005. When I try to edit a column with integers, it just skips back to the original numbers after pressing enter..., why
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(e.item,"Task",var_Items.get_CellValue(e.item,2),var_Items.get_CellValue(e.item,4),null,null); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); // Error event - Fired when an internal error occurs. private void axG2antt1_Error(object sender, AxEXG2ANTTLib._IG2anttEvents_ErrorEvent e) { System.Diagnostics.Debug.Print( e.error.ToString() ); System.Diagnostics.Debug.Print( e.description.ToString() ); } //this.axG2antt1.Error += new AxEXG2ANTTLib._IG2anttEvents_ErrorEventHandler(this.axG2antt1_Error); axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("8/3/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,256); var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday; var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; axG2antt1.ColumnAutoResize = false; axG2antt1.ContinueColumnScroll = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB.CursorTypeEnum.adOpenKeyset,ADODB.LockTypeEnum.adLockReadOnly,0); axG2antt1.DataSource = (rs as ADODB.Recordset); axG2antt1.Items.AllowCellValueToItemBar = true; axG2antt1.Columns[2].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); axG2antt1.Columns[4].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); axG2antt1.EndUpdate(); |
1378 |
Is it possible to reduce the non-working parts of the control
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,40); var_Chart.FirstVisibleDate = Convert.ToDateTime("6/20/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 64; var_Chart.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems; var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation; var_Bar.HistogramPattern = var_Bar.Pattern; var_Chart.UnitWidthNonworking = -8; var_Chart.get_Level(1).FormatLabel = "weekday(dvalue) in (0,6) ? `` : value"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/23/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/29/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","4 working days bar"); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,false); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,4); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); h = var_Items.AddItem("Task B"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/28/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/30/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","2 working days bar"); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,false); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,2); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); axG2antt1.EndUpdate(); |
1377 |
I don't want to see the "schedule"/show "workload" in non-working days part of the histogram
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,40); var_Chart.FirstVisibleDate = Convert.ToDateTime("6/20/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 64; var_Chart.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems; var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation; var_Bar.HistogramPattern = var_Bar.Pattern; var_Chart.ShowNonworkingDates = false; var_Chart.ShowNonworkingUnits = false; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/23/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/29/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","4 working days bar"); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,false); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,4); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); h = var_Items.AddItem("Task B"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/28/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/30/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","2 working days bar"); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,false); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,2); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); axG2antt1.EndUpdate(); |
1376 |
The control shows, and handles non-working days PERFECT, but how is it possible to reflect this in the Histogram. I don't want to "schedule"/show "workload" in non-working days...
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,40); var_Chart.FirstVisibleDate = Convert.ToDateTime("6/20/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 64; var_Chart.HistogramView = EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems; var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.HistogramType = EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation; var_Bar.HistogramPattern = var_Bar.Pattern; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/23/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/29/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","4 working days bar"); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,false); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,4); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); h = var_Items.AddItem("Task B"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/28/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/30/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"","2 working days bar"); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize,false); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort,2); var_Items.set_ItemBar(h,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); axG2antt1.EndUpdate(); |
1375 |
When I do select the button in the overview-zoom I want the scaling to change accordingly. Can I set different scales per selected zoom level
// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area. private void axG2antt1_OverviewZoom(object sender, EventArgs e) { System.Diagnostics.Debug.Print( axG2antt1.Chart.UnitScale.ToString() ); } //this.axG2antt1.OverviewZoom += new EventHandler(this.axG2antt1_OverviewZoom); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,0); var_Chart.LevelCount = 2; var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.AllowOverviewZoom = EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom; var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exSecond,""); var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exYear,""); |
1374 |
How do I display Icons instead of text in the overview zoom area
axG2antt1.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.AllowOverviewZoom = EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom; var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exSecond,""); var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exYear,""); System.Diagnostics.Debug.Print( var_Chart.OverviewZoomCaption ); var_Chart.OverviewZoomCaption = "Year|½Year|¼Year|Month|Third|<img>1</img>|Day|Hour|Min|Sec"; |
1373 |
How do I get it to only display Min, Hour, Day, Week , Month, ie remove Sec and Year in the overview area
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.AllowOverviewZoom = EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom; var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exSecond,""); var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exYear,""); |
1372 |
Is it possible to show quarter hours markers
axG2antt1.BeginUpdate(); axG2antt1.GridLineColor = Color.FromArgb(0,0,0); axG2antt1.VisualAppearance.Add(3,"gBFLBCJwBAEHhEJAEGg4BdMIQAAYAQGKIYBkAKBQAGaAoDDUNw5QwAAwjSKkEwsACEIrjKCRShyCYZRhGcTAFBMIhkGoSZKlCIRVDCKYJDbKACSFKkNQ7AabZBgOQJV" + "gOKovThKcIybQAASJCKRY7nUIIJA+SoDSRAbqhYIgASnKqLJAkACIJJAaRjHQdJxGKKMQANBghCZseKhWgkKIJUxAdLTWAAMQuaCoZ5icRAca2fJ+XzfeBYDgmAYNQbD" + "cJhHCMMwXDaJZBiGJ4dimI4rR7JIDzDJ8cxbEKTZ5meg5boGRZNTrMQA0fQ9MynK6vahfOi7DpuaZnWrcMb2fYNZwrGq0bxoW58BwmP5/XrkNa4XgcVgmAUBA"); axG2antt1.HeaderHeight = 20; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,0); var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exHour; EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0); var_Level.Alignment = EXG2ANTTLib.AlignmentEnum.exHOutside; var_Level.Label = "<%dddd%>, <%mmmm%> <b><%d%></b>, <%yyyy%>"; var_Level.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelSolidLine; EXG2ANTTLib.Level var_Level1 = var_Chart.get_Level(1); var_Level1.Label = "<%hh%>:00"; var_Level1.BackColor = 0x3000000; var_Level1.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelSolidLine; var_Chart.DrawLevelSeparator = EXG2ANTTLib.LevelLineEnum.exLevelSolidLine; var_Chart.UnitWidth = 64; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exMinute; var_Chart.ResizeUnitCount = 15; axG2antt1.EndUpdate(); |
1371 |
How can I ensure or always show the labels on the chart part, when scrolling the chart to left or right
|
1370 |
I associate the Start and End columns with bars, but some of them are not shown. What am I doing wrong
axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; axG2antt1.Items.AllowCellValueToItemBar = true; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/25/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Start") as EXG2ANTTLib.Column); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"K1"); EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add("End") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"K1"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem(null),"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem(null),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem(null),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"????","????"); axG2antt1.EndUpdate(); |
1369 |
How can I implement OLE Drag and Drop operation
// OLEStartDrag event - Occurs when the OLEDrag method is called. private void axG2antt1_OLEStartDrag(object sender, AxEXG2ANTTLib._IG2anttEvents_OLEStartDragEvent e) { // Data.SetData("your data to drag") e.allowedEffects = 2; } //this.axG2antt1.OLEStartDrag += new AxEXG2ANTTLib._IG2anttEvents_OLEStartDragEventHandler(this.axG2antt1_OLEStartDrag); axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.Columns.Add("Default"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Item 1"); var_Items.AddItem("Item 2"); var_Items.AddItem("Item 3"); var_Items.AddItem("Item 4"); var_Items.AddItem("Item 5"); axG2antt1.OLEDropMode = EXG2ANTTLib.exOLEDropModeEnum.exOLEDropManual; axG2antt1.EndUpdate(); |
1368 |
I can not associate the bar's start and end properties with my start/end columns, only if the bar's key is empty or null. What can I do
// ButtonClick event - Occurs when user clicks on the cell's button. private void axG2antt1_ButtonClick(object sender, AxEXG2ANTTLib._IG2anttEvents_ButtonClickEvent e) { axG2antt1.BeginUpdate(); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns["Tasks"].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"B"); var_Columns["Start"].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"B"); var_Columns["End"].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"B"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(e.item,1,"B"); var_Items.set_ItemBar(0,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,0); var_Items.set_ItemBar(0,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16775408); axG2antt1.EndUpdate(); } //this.axG2antt1.ButtonClick += new AxEXG2ANTTLib._IG2anttEvents_ButtonClickEventHandler(this.axG2antt1_ButtonClick); axG2antt1.BeginUpdate(); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("Tasks") as EXG2ANTTLib.Column); var_Column.Width = 32; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,3); var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A"); EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("Start") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A"); var_Column1.Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; EXG2ANTTLib.Column var_Column2 = (var_Columns.Add("End") as EXG2ANTTLib.Column); var_Column2.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column2.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey,"A"); var_Column2.Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowLinkBars = true; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,196); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal; var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.set_Overlaid(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsTransparent,80); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_LockedItemCount(EXG2ANTTLib.VAlignmentEnum.exTop,1); int h = var_Items.get_LockedItem(EXG2ANTTLib.VAlignmentEnum.exTop,0); var_Items.set_CellValue(h,0,"Select"); var_Items.set_CellHasButton(h,0,true); var_Items.set_CellMerge(h,1,2); var_Items.set_CellValue(h,1,"A"); var_Items.get_CellEditor(h,1).EditType = EXG2ANTTLib.EditTypeEnum.EditType; EXG2ANTTLib.Items var_Items1 = axG2antt1.Items; var_Items1.AllowCellValueToItemBar = true; h = var_Items1.AddItem("Task 1"); var_Items1.AddBar(h,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); var_Items1.AddBar(h,"Task",Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items1.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16775408); h = var_Items1.AddItem("Task 2"); var_Items1.AddBar(h,"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","A"); var_Items1.AddBar(h,"Task",Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/29/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","B"); var_Items1.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16775408); axG2antt1.EndUpdate(); |
1367 |
How can I determine the order of the events
// AddLink event - Occurs when the user links two bars using the mouse. private void axG2antt1_AddLink(object sender, AxEXG2ANTTLib._IG2anttEvents_AddLinkEvent e) { System.Diagnostics.Debug.Print( "AddLink" ); System.Diagnostics.Debug.Print( e.linkKey.ToString() ); } //this.axG2antt1.AddLink += new AxEXG2ANTTLib._IG2anttEvents_AddLinkEventHandler(this.axG2antt1_AddLink); // AfterExpandItem event - Fired after an item is expanded (collapsed). private void axG2antt1_AfterExpandItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AfterExpandItemEvent e) { System.Diagnostics.Debug.Print( "AfterExpandItem" ); System.Diagnostics.Debug.Print( e.item.ToString() ); } //this.axG2antt1.AfterExpandItem += new AxEXG2ANTTLib._IG2anttEvents_AfterExpandItemEventHandler(this.axG2antt1_AfterExpandItem); // AllowLink event - Notifies at runtime when a link between two bars is possible. private void axG2antt1_AllowLink(object sender, AxEXG2ANTTLib._IG2anttEvents_AllowLinkEvent e) { System.Diagnostics.Debug.Print( "AllowLink" ); System.Diagnostics.Debug.Print( e.startItem.ToString() ); System.Diagnostics.Debug.Print( e.startBarKey.ToString() ); System.Diagnostics.Debug.Print( e.endItem.ToString() ); System.Diagnostics.Debug.Print( e.endBarKey.ToString() ); System.Diagnostics.Debug.Print( e.linkKey.ToString() ); } //this.axG2antt1.AllowLink += new AxEXG2ANTTLib._IG2anttEvents_AllowLinkEventHandler(this.axG2antt1_AllowLink); // AnchorClick event - Occurs when an anchor element is clicked. private void axG2antt1_AnchorClick(object sender, AxEXG2ANTTLib._IG2anttEvents_AnchorClickEvent e) { System.Diagnostics.Debug.Print( "AnchorClick" ); System.Diagnostics.Debug.Print( e.anchorID.ToString() ); System.Diagnostics.Debug.Print( e.options.ToString() ); } //this.axG2antt1.AnchorClick += new AxEXG2ANTTLib._IG2anttEvents_AnchorClickEventHandler(this.axG2antt1_AnchorClick); // BarParentChange event - Occurs just before moving a bar from current item to another item. private void axG2antt1_BarParentChange(object sender, AxEXG2ANTTLib._IG2anttEvents_BarParentChangeEvent e) { System.Diagnostics.Debug.Print( "BarParentChange" ); System.Diagnostics.Debug.Print( e.item.ToString() ); System.Diagnostics.Debug.Print( e.key.ToString() ); System.Diagnostics.Debug.Print( e.newItem.ToString() ); } //this.axG2antt1.BarParentChange += new AxEXG2ANTTLib._IG2anttEvents_BarParentChangeEventHandler(this.axG2antt1_BarParentChange); // BarResize event - Occurs when a bar is moved or resized. private void axG2antt1_BarResize(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizeEvent e) { System.Diagnostics.Debug.Print( "BarResize" ); System.Diagnostics.Debug.Print( e.item.ToString() ); System.Diagnostics.Debug.Print( e.key.ToString() ); } //this.axG2antt1.BarResize += new AxEXG2ANTTLib._IG2anttEvents_BarResizeEventHandler(this.axG2antt1_BarResize); // BarResizing event - Occurs when a bar is moving or resizing. private void axG2antt1_BarResizing(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent e) { System.Diagnostics.Debug.Print( "BarResizing" ); System.Diagnostics.Debug.Print( e.item.ToString() ); System.Diagnostics.Debug.Print( e.key.ToString() ); } //this.axG2antt1.BarResizing += new AxEXG2ANTTLib._IG2anttEvents_BarResizingEventHandler(this.axG2antt1_BarResizing); // BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). private void axG2antt1_BeforeExpandItem(object sender, AxEXG2ANTTLib._IG2anttEvents_BeforeExpandItemEvent e) { System.Diagnostics.Debug.Print( "BeforeExpandItem" ); System.Diagnostics.Debug.Print( e.item.ToString() ); } //this.axG2antt1.BeforeExpandItem += new AxEXG2ANTTLib._IG2anttEvents_BeforeExpandItemEventHandler(this.axG2antt1_BeforeExpandItem); // ButtonClick event - Occurs when user clicks on the cell's button. private void axG2antt1_ButtonClick(object sender, AxEXG2ANTTLib._IG2anttEvents_ButtonClickEvent e) { System.Diagnostics.Debug.Print( "ButtonClick" ); System.Diagnostics.Debug.Print( e.item.ToString() ); System.Diagnostics.Debug.Print( e.colIndex.ToString() ); System.Diagnostics.Debug.Print( e.key.ToString() ); } //this.axG2antt1.ButtonClick += new AxEXG2ANTTLib._IG2anttEvents_ButtonClickEventHandler(this.axG2antt1_ButtonClick); // CellImageClick event - Fired after the user clicks on the image's cell area. private void axG2antt1_CellImageClick(object sender, AxEXG2ANTTLib._IG2anttEvents_CellImageClickEvent e) { System.Diagnostics.Debug.Print( "CellImageClick" ); System.Diagnostics.Debug.Print( e.item.ToString() ); System.Diagnostics.Debug.Print( e.colIndex.ToString() ); } //this.axG2antt1.CellImageClick += new AxEXG2ANTTLib._IG2anttEvents_CellImageClickEventHandler(this.axG2antt1_CellImageClick); // CellStateChanged event - Fired after cell's state has been changed. private void axG2antt1_CellStateChanged(object sender, AxEXG2ANTTLib._IG2anttEvents_CellStateChangedEvent e) { System.Diagnostics.Debug.Print( "CellStateChanged" ); System.Diagnostics.Debug.Print( e.item.ToString() ); System.Diagnostics.Debug.Print( e.colIndex.ToString() ); } //this.axG2antt1.CellStateChanged += new AxEXG2ANTTLib._IG2anttEvents_CellStateChangedEventHandler(this.axG2antt1_CellStateChanged); // Change event - Occurs when the user changes the cell's content. private void axG2antt1_Change(object sender, AxEXG2ANTTLib._IG2anttEvents_ChangeEvent e) { System.Diagnostics.Debug.Print( "Change" ); System.Diagnostics.Debug.Print( e.item.ToString() ); System.Diagnostics.Debug.Print( e.colIndex.ToString() ); System.Diagnostics.Debug.Print( e.newValue.ToString() ); } //this.axG2antt1.Change += new AxEXG2ANTTLib._IG2anttEvents_ChangeEventHandler(this.axG2antt1_Change); // ChartEndChanging event - Occurs after the chart has been changed. private void axG2antt1_ChartEndChanging(object sender, AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEvent e) { System.Diagnostics.Debug.Print( "ChartEndChanging" ); System.Diagnostics.Debug.Print( e.operation.ToString() ); } //this.axG2antt1.ChartEndChanging += new AxEXG2ANTTLib._IG2anttEvents_ChartEndChangingEventHandler(this.axG2antt1_ChartEndChanging); // ChartSelectionChanged event - Occurs when the user selects objects in the chart area. private void axG2antt1_ChartSelectionChanged(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "ChartSelectionChanged" ); } //this.axG2antt1.ChartSelectionChanged += new EventHandler(this.axG2antt1_ChartSelectionChanged); // ChartStartChanging event - Occurs when the chart is about to be changed. private void axG2antt1_ChartStartChanging(object sender, AxEXG2ANTTLib._IG2anttEvents_ChartStartChangingEvent e) { System.Diagnostics.Debug.Print( "ChartStartChanging" ); System.Diagnostics.Debug.Print( e.operation.ToString() ); } //this.axG2antt1.ChartStartChanging += new AxEXG2ANTTLib._IG2anttEvents_ChartStartChangingEventHandler(this.axG2antt1_ChartStartChanging); // Click event - Occurs when the user presses and then releases the left mouse button over the tree control. private void axG2antt1_ClickEvent(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "Click" ); } //this.axG2antt1.ClickEvent += new EventHandler(this.axG2antt1_ClickEvent); // ColumnClick event - Fired after the user clicks on column's header. private void axG2antt1_ColumnClick(object sender, AxEXG2ANTTLib._IG2anttEvents_ColumnClickEvent e) { System.Diagnostics.Debug.Print( "ColumnClick" ); } //this.axG2antt1.ColumnClick += new AxEXG2ANTTLib._IG2anttEvents_ColumnClickEventHandler(this.axG2antt1_ColumnClick); // CreateBar event - Fired when the user creates a new bar. private void axG2antt1_CreateBar(object sender, AxEXG2ANTTLib._IG2anttEvents_CreateBarEvent e) { System.Diagnostics.Debug.Print( "CreateBar" ); System.Diagnostics.Debug.Print( e.item.ToString() ); System.Diagnostics.Debug.Print( e.dateStart.ToString() ); System.Diagnostics.Debug.Print( e.dateEnd.ToString() ); } //this.axG2antt1.CreateBar += new AxEXG2ANTTLib._IG2anttEvents_CreateBarEventHandler(this.axG2antt1_CreateBar); // DateChange event - Occurs when the first visible date is changed. private void axG2antt1_DateChange(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "DateChange" ); } //this.axG2antt1.DateChange += new EventHandler(this.axG2antt1_DateChange); // DblClick event - Occurs when the user dblclk the left mouse button over an object. private void axG2antt1_DblClick(object sender, AxEXG2ANTTLib._IG2anttEvents_DblClickEvent e) { System.Diagnostics.Debug.Print( "DblClick" ); System.Diagnostics.Debug.Print( e.shift.ToString() ); System.Diagnostics.Debug.Print( e.x.ToString() ); System.Diagnostics.Debug.Print( e.y.ToString() ); axG2antt1.Edit(null); } //this.axG2antt1.DblClick += new AxEXG2ANTTLib._IG2anttEvents_DblClickEventHandler(this.axG2antt1_DblClick); // Edit event - Occurs just before editing the focused cell. private void axG2antt1_EditEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_EditEvent e) { System.Diagnostics.Debug.Print( "Edit" ); System.Diagnostics.Debug.Print( e.item.ToString() ); System.Diagnostics.Debug.Print( e.colIndex.ToString() ); } //this.axG2antt1.EditEvent += new AxEXG2ANTTLib._IG2anttEvents_EditEventHandler(this.axG2antt1_EditEvent); // EditClose event - Occurs when the edit operation ends. private void axG2antt1_EditCloseEvent(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "EditClose" ); } //this.axG2antt1.EditCloseEvent += new EventHandler(this.axG2antt1_EditCloseEvent); // EditOpen event - Occurs when the edit operation starts. private void axG2antt1_EditOpen(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "EditOpen" ); } //this.axG2antt1.EditOpen += new EventHandler(this.axG2antt1_EditOpen); // FilterChange event - Occurs when the filter was changed. private void axG2antt1_FilterChange(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "FilterChange" ); } //this.axG2antt1.FilterChange += new EventHandler(this.axG2antt1_FilterChange); // FilterChanging event - Notifies your application that the filter is about to change. private void axG2antt1_FilterChanging(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "FilterChanging" ); } //this.axG2antt1.FilterChanging += new EventHandler(this.axG2antt1_FilterChanging); // FocusChanged event - Occurs when a cell gets the focus. private void axG2antt1_FocusChanged(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "FocusChanged" ); } //this.axG2antt1.FocusChanged += new EventHandler(this.axG2antt1_FocusChanged); // InsideZoom event - Notifies your application that a date is about to be magnified. private void axG2antt1_InsideZoom(object sender, AxEXG2ANTTLib._IG2anttEvents_InsideZoomEvent e) { System.Diagnostics.Debug.Print( "InsideZoom" ); System.Diagnostics.Debug.Print( e.dateTime.ToString() ); } //this.axG2antt1.InsideZoom += new AxEXG2ANTTLib._IG2anttEvents_InsideZoomEventHandler(this.axG2antt1_InsideZoom); // KeyDown event - Occurs when the user presses a key while an object has the focus. private void axG2antt1_KeyDownEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_KeyDownEvent e) { System.Diagnostics.Debug.Print( "KeyDown" ); System.Diagnostics.Debug.Print( e.keyCode.ToString() ); System.Diagnostics.Debug.Print( e.shift.ToString() ); } //this.axG2antt1.KeyDownEvent += new AxEXG2ANTTLib._IG2anttEvents_KeyDownEventHandler(this.axG2antt1_KeyDownEvent); // KeyPress event - Occurs when the user presses and releases an ANSI key. private void axG2antt1_KeyPressEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_KeyPressEvent e) { System.Diagnostics.Debug.Print( "KeyPress" ); System.Diagnostics.Debug.Print( e.keyAscii.ToString() ); } //this.axG2antt1.KeyPressEvent += new AxEXG2ANTTLib._IG2anttEvents_KeyPressEventHandler(this.axG2antt1_KeyPressEvent); // KeyUp event - Occurs when the user releases a key while an object has the focus. private void axG2antt1_KeyUpEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_KeyUpEvent e) { System.Diagnostics.Debug.Print( "KeyUp" ); System.Diagnostics.Debug.Print( e.keyCode.ToString() ); System.Diagnostics.Debug.Print( e.shift.ToString() ); } //this.axG2antt1.KeyUpEvent += new AxEXG2ANTTLib._IG2anttEvents_KeyUpEventHandler(this.axG2antt1_KeyUpEvent); // LayoutChanged event - Occurs when column's position or column's size is changed. private void axG2antt1_LayoutChanged(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "LayoutChanged" ); } //this.axG2antt1.LayoutChanged += new EventHandler(this.axG2antt1_LayoutChanged); // MouseDown event - Occurs when the user presses a mouse button. private void axG2antt1_MouseDownEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseDownEvent e) { System.Diagnostics.Debug.Print( "MouseDown" ); System.Diagnostics.Debug.Print( e.button.ToString() ); System.Diagnostics.Debug.Print( e.shift.ToString() ); System.Diagnostics.Debug.Print( e.x.ToString() ); System.Diagnostics.Debug.Print( e.y.ToString() ); } //this.axG2antt1.MouseDownEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseDownEventHandler(this.axG2antt1_MouseDownEvent); // MouseMove event - Occurs when the user moves the mouse. private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { } //this.axG2antt1.MouseMoveEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseMoveEventHandler(this.axG2antt1_MouseMoveEvent); // MouseUp event - Occurs when the user releases a mouse button. private void axG2antt1_MouseUpEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseUpEvent e) { System.Diagnostics.Debug.Print( "MouseUp" ); System.Diagnostics.Debug.Print( e.button.ToString() ); System.Diagnostics.Debug.Print( e.shift.ToString() ); System.Diagnostics.Debug.Print( e.x.ToString() ); System.Diagnostics.Debug.Print( e.y.ToString() ); } //this.axG2antt1.MouseUpEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseUpEventHandler(this.axG2antt1_MouseUpEvent); // OffsetChanged event - Occurs when the scroll position has been changed. private void axG2antt1_OffsetChanged(object sender, AxEXG2ANTTLib._IG2anttEvents_OffsetChangedEvent e) { System.Diagnostics.Debug.Print( "OffsetChanged" ); System.Diagnostics.Debug.Print( e.horizontal.ToString() ); System.Diagnostics.Debug.Print( e.newVal.ToString() ); } //this.axG2antt1.OffsetChanged += new AxEXG2ANTTLib._IG2anttEvents_OffsetChangedEventHandler(this.axG2antt1_OffsetChanged); // OversizeChanged event - Occurs when the right range of the scroll has been changed. private void axG2antt1_OversizeChanged(object sender, AxEXG2ANTTLib._IG2anttEvents_OversizeChangedEvent e) { System.Diagnostics.Debug.Print( "OversizeChanged" ); System.Diagnostics.Debug.Print( e.horizontal.ToString() ); System.Diagnostics.Debug.Print( e.newVal.ToString() ); } //this.axG2antt1.OversizeChanged += new AxEXG2ANTTLib._IG2anttEvents_OversizeChangedEventHandler(this.axG2antt1_OversizeChanged); // OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area. private void axG2antt1_OverviewZoom(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "OverviewZoom" ); } //this.axG2antt1.OverviewZoom += new EventHandler(this.axG2antt1_OverviewZoom); // RClick event - Fired when right mouse button is clicked private void axG2antt1_RClick(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "RClick" ); } //this.axG2antt1.RClick += new EventHandler(this.axG2antt1_RClick); // ScrollButtonClick event - Occurs when the user clicks a button in the scrollbar. private void axG2antt1_ScrollButtonClick(object sender, AxEXG2ANTTLib._IG2anttEvents_ScrollButtonClickEvent e) { System.Diagnostics.Debug.Print( "ScrollButtonClick" ); System.Diagnostics.Debug.Print( e.scrollBar.ToString() ); System.Diagnostics.Debug.Print( e.scrollPart.ToString() ); } //this.axG2antt1.ScrollButtonClick += new AxEXG2ANTTLib._IG2anttEvents_ScrollButtonClickEventHandler(this.axG2antt1_ScrollButtonClick); // SelectionChanged event - Fired after a new item has been selected. private void axG2antt1_SelectionChanged(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "SelectionChanged" ); } //this.axG2antt1.SelectionChanged += new EventHandler(this.axG2antt1_SelectionChanged); // Sort event - Fired when the control sorts a column. private void axG2antt1_Sort(object sender, EventArgs e) { System.Diagnostics.Debug.Print( "Sort" ); } //this.axG2antt1.Sort += new EventHandler(this.axG2antt1_Sort); axG2antt1.BeginUpdate(); axG2antt1.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.GridLineStyle = EXG2ANTTLib.GridLinesStyleEnum.exGridLinesHDash; axG2antt1.AutoEdit = false; axG2antt1.ExpandOnDblClick = false; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.AllowInsideZoom = true; var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.AllowOverviewZoom = EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.GridLineStyle = EXG2ANTTLib.GridLinesStyleEnum.exGridLinesVSolid | EXG2ANTTLib.GridLinesStyleEnum.exGridLinesHDash; var_Chart.LevelCount = 2; var_Chart.get_Level(0).DrawGridLines = true; var_Chart.Bars["Task"].Pattern = EXG2ANTTLib.PatternEnum.exPatternSolid; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exSecond,""); var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exMinute,""); var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exHour,""); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("Column") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("Button") as EXG2ANTTLib.Column); var_Column1.AllowSizing = false; var_Column1.Width = 18; var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasButton,true); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("parent"); var_Items.set_CellImage(h,0,1); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","<a>A</a>"); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,true); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip,"This is a bit of text that should be shown when cursor hovers the bar"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B","<a>B</a>"); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.set_ItemBar(h,"B",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,true); var_Items.InsertItem(h,"","child"); var_Items.set_ExpandItem(h,true); axG2antt1.EndUpdate(); |
1366 |
How can I change the chart's horizontal grid lines
axG2antt1.BeginUpdate(); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.GridLineStyle = EXG2ANTTLib.GridLinesStyleEnum.exGridLinesHDash; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,48); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.GridLineStyle = EXG2ANTTLib.GridLinesStyleEnum.exGridLinesVSolid | EXG2ANTTLib.GridLinesStyleEnum.exGridLinesHDash; var_Chart.LevelCount = 2; var_Chart.get_Level(0).DrawGridLines = true; var_Chart.Bars["Task"].Pattern = EXG2ANTTLib.PatternEnum.exPatternSolid; axG2antt1.Columns.Add("Column"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Item 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); axG2antt1.EndUpdate(); |
1365 |
Is there any way to determine whether the ADO operations fails
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(e.item,"Task",var_Items.get_CellValue(e.item,2),var_Items.get_CellValue(e.item,4),null,null); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); // Error event - Fired when an internal error occurs. private void axG2antt1_Error(object sender, AxEXG2ANTTLib._IG2anttEvents_ErrorEvent e) { System.Diagnostics.Debug.Print( e.error.ToString() ); System.Diagnostics.Debug.Print( e.description.ToString() ); } //this.axG2antt1.Error += new AxEXG2ANTTLib._IG2anttEvents_ErrorEventHandler(this.axG2antt1_Error); axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("8/3/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,256); var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday; var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; axG2antt1.ColumnAutoResize = false; axG2antt1.ContinueColumnScroll = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB.CursorTypeEnum.adOpenKeyset,ADODB.LockTypeEnum.adLockReadOnly,0); axG2antt1.DataSource = (rs as ADODB.Recordset); axG2antt1.Items.AllowCellValueToItemBar = true; axG2antt1.Columns[2].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); axG2antt1.Columns[4].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); axG2antt1.EndUpdate(); |
1364 |
Is it possible to select a column instead sorting it
// ColumnClick event - Fired after the user clicks on column's header. private void axG2antt1_ColumnClick(object sender, AxEXG2ANTTLib._IG2anttEvents_ColumnClickEvent e) { // Column.Selected = True axG2antt1.BeginUpdate(); axG2antt1.Columns[0].Selected = false; axG2antt1.Columns[1].Selected = false; axG2antt1.Items.SelectAll(); axG2antt1.EndUpdate(); } //this.axG2antt1.ColumnClick += new AxEXG2ANTTLib._IG2anttEvents_ColumnClickEventHandler(this.axG2antt1_ColumnClick); axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; axG2antt1.ShowFocusRect = false; axG2antt1.SingleSel = false; axG2antt1.FullRowSelect = EXG2ANTTLib.CellSelectEnum.exRectSel; axG2antt1.SortOnClick = EXG2ANTTLib.SortOnClickEnum.exNoSort; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Column1"); var_Columns.Add("Column2"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem("One"),1,"Three"); var_Items.set_CellValue(var_Items.AddItem("Two"),1,"Four"); var_Items.SelectAll(); axG2antt1.EndUpdate(); |
1363 |
I am using the exRectSel, and clicking the first column, has no effect, instead if I click other it works as it should
axG2antt1.BeginUpdate(); axG2antt1.SearchColumnIndex = -1; axG2antt1.FullRowSelect = EXG2ANTTLib.CellSelectEnum.exRectSel; axG2antt1.ShowFocusRect = false; axG2antt1.MarkSearchColumn = false; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Column1"); var_Columns.Add("Column2"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem(1),1,2); var_Items.set_CellValue(var_Items.AddItem(3),1,4); var_Items.set_CellValue(var_Items.AddItem(5),1,6); axG2antt1.EndUpdate(); |
1362 |
Is it possible to display empty strings for 0 values
EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Currency") as EXG2ANTTLib.Column); var_Column.FormatColumn = "dbl(value) ? currency(dbl(value)) : ``"; EXG2ANTTLib.Editor var_Editor = var_Column.Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; var_Editor.Numeric = EXG2ANTTLib.NumericEnum.exFloat; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(1.23); var_Items.AddItem(2.34); var_Items.AddItem(0); var_Items.AddItem(10000.99); |
1361 |
Is it possible to display empty strings for 0 values
axG2antt1.Columns.Add("Number"); (axG2antt1.Columns.Add("Currency") as EXG2ANTTLib.Column).ComputedField = "%0 ? currency(%0) : ``"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(1.23); var_Items.AddItem(2.34); var_Items.AddItem(0); var_Items.AddItem(10000.99); |
1360 |
How can I hide a date from the chart view, when I display hours instead days
axG2antt1.BeginUpdate(); axG2antt1.HeaderHeight = 32; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("6/8/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AdjustLevelsToBase = true; var_Chart.set_PaneWidth(false,0); var_Chart.LevelCount = 2; var_Chart.AllowInsideZoom = true; EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0); var_Level.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Level.Label = "<b><%d%>-<%mmm%>-<%yyyy%>"; var_Level.Unit = EXG2ANTTLib.UnitEnum.exDay; EXG2ANTTLib.Level var_Level1 = var_Chart.get_Level(1); var_Level1.Label = "<%h%>"; var_Level1.Count = 8; var_Level1.Unit = EXG2ANTTLib.UnitEnum.exHour; var_Level1.FormatLabel = "date(int(dvalue)) case (#06/08/2011# : (int(value) case ( 0 : 'Shift <b>1</b><br>23/20'; 8 : 'Shift <b>2</b><br>38/30' ; 16 : '" + "Shift <b>3</b><br>24/24' ) ) ; #06/09/2011# : (int(value) case ( 0 : 'Shift <b>1</b><br>15/20'; 8 : 'Shift <b>2</b><br>30/32' ; " + "16 : 'Shift <b>3</b><br>26/24' ) ) )"; var_Chart.UnitWidth = 64; var_Chart.NonworkingDays = 0; var_Chart.AllowInsideZoom = true; var_Chart.DefaultInsideZoomFormat.InsideUnit = EXG2ANTTLib.UnitEnum.exMinute; var_Chart.AllowResizeInsideZoom = false; var_Chart.InsideZoomOnDblClick = false; EXG2ANTTLib.InsideZooms var_InsideZooms = var_Chart.InsideZooms; var_InsideZooms.SplitBaseLevel = false; var_InsideZooms.DefaultWidth = 0; EXG2ANTTLib.InsideZooms var_InsideZooms1 = var_Chart.InsideZooms; var_InsideZooms1.Add(Convert.ToDateTime("6/9/2011 8:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_InsideZooms1.Add(Convert.ToDateTime("6/9/2011 16:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); axG2antt1.EndUpdate(); |
1359 |
I’ve created a skin (EBN) for the bars of my chart, with rounded top corners. The problem, is that these rounded corners are applied also at beginning and the end of the non working units. Is it possible to show a different picture/skin for the non-working part of the bars
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1,"c:\\exontrol\\images\\normal.ebn"); axG2antt1.VisualAppearance.Add(2,"c:\\exontrol\\images\\pushed.ebn"); axG2antt1.Columns.Add("Task"); axG2antt1.Chart.set_PaneWidth(false,128); EXG2ANTTLib.Bars var_Bars = axG2antt1.Chart.Bars; var_Bars["Task"].Color = 0x1000000; var_Bars["Split"].Color = 0x2000000; var_Bars.Add("Task:Split").Shortcut = "TS"; axG2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task"),"TS",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1358 |
How do I display the names of the tasks on bars but not in the middle of the bar (left or right)
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/27/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternDot; var_Bar.Height = 15; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","<b>to do</b> "); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,2); h = var_Items.AddItem("Task 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","<b>to do</b>"); var_Items.set_ItemBar(h,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); h = var_Items.AddItem("Task 3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1"," <b>to do</b>"); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,0); h = var_Items.AddItem("Task 4"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","<b>to do</b>"); var_Items.set_ItemBar(h,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,16); axG2antt1.EndUpdate(); |
1357 |
How can I get the list of items as they are displayed
axG2antt1.BeginUpdate(); axG2antt1.BackColorAlternate = Color.FromArgb(240,240,240); axG2antt1.Columns.Add("Names"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Mantel"); var_Items.AddItem("Mechanik"); var_Items.AddItem("Motor"); var_Items.AddItem("Murks"); var_Items.AddItem("Märchen"); var_Items.AddItem("Möhren"); var_Items.AddItem("Mühle"); axG2antt1.Columns[0].SortOrder = EXG2ANTTLib.SortOrderEnum.SortAscending; axG2antt1.EndUpdate(); System.Diagnostics.Debug.Print( axG2antt1.GetItems(1).ToString() ); |
1356 |
How can I disable the left and right arrows to move to next cell while editing
EXG2ANTTLib.Editor var_Editor = (axG2antt1.Columns.Add("Edit") as EXG2ANTTLib.Column).Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; var_Editor.set_Option(EXG2ANTTLib.EditorOptionEnum.exLeftArrow,0); var_Editor.set_Option(EXG2ANTTLib.EditorOptionEnum.exRightArrow,0); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Cell 1"); var_Items.AddItem("Cell 2"); var_Items.AddItem("Cell 3"); |
1355 |
Is it possible to define a bar that is treated as a non-working hour so user can move it at runtime
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.AllowNonworkingBars = true; var_Chart.Bars.Add("Task:Split").Shortcut = "Task"; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exHour; var_Chart.get_Level(1).Label = "<font ;4><%hh%>"; var_Chart.UnitWidth = 12; var_Chart.NonworkingDaysPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal; var_Chart.NonworkingDays = 0; axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Machine"); var_Items.set_ItemNonworkingUnits(h,false,"0"); var_Items.AddBar(h,"",Convert.ToDateTime("1/1/2001 9:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/1/2001 11:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A","pause"); var_Items.set_ItemBar(h,"A",EXG2ANTTLib.ItemBarPropertyEnum.exBarTreatAsNonworking,true); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/1/2001 12:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/1/2001 17:00:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"Z",null); var_Items.set_ItemBar(h,"Z",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); axG2antt1.EndUpdate(); |
1354 |
Is it possible to customize the chart's header so I can display shift and other values
|
1353 |
How can I change both start and end dates of the bar
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Tasks"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,64); var_Chart.FirstVisibleDate = Convert.ToDateTime("6/19/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Test"); var_Items.AddBar(h,"Task",Convert.ToDateTime("6/22/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/27/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"t1",null); var_Items.AddBar(h,var_Items.get_ItemBar(h,"t1",EXG2ANTTLib.ItemBarPropertyEnum.exBarName),Convert.ToDateTime("6/21/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/22/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"t1",null); axG2antt1.EndUpdate(); |
1352 |
Is it possible to add new rows, as I type like in Excel
// EditClose event - Occurs when the edit operation ends. private void axG2antt1_EditCloseEvent(object sender, EventArgs e) { axG2antt1.Items.AddItem(""); } //this.axG2antt1.EditCloseEvent += new EventHandler(this.axG2antt1_EditCloseEvent); axG2antt1.BeginUpdate(); axG2antt1.AutoEdit = true; (axG2antt1.Columns.Add("Default") as EXG2ANTTLib.Column).Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; axG2antt1.FullRowSelect = EXG2ANTTLib.CellSelectEnum.exColumnSel; axG2antt1.Items.AddItem(""); axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines; axG2antt1.ScrollBars = EXG2ANTTLib.ScrollBarsEnum.exDisableBoth; axG2antt1.EndUpdate(); |
1351 |
How do I load bars from my table/database
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(e.item,"Task",var_Items.get_CellValue(e.item,2),var_Items.get_CellValue(e.item,4),null,null); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("8/3/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,256); var_Chart.LevelCount = 2; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday; var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; axG2antt1.ColumnAutoResize = false; axG2antt1.ContinueColumnScroll = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0); axG2antt1.DataSource = (rs as ADODB.Recordset); axG2antt1.Items.AllowCellValueToItemBar = true; axG2antt1.Columns[2].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); axG2antt1.Columns[4].set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); axG2antt1.EndUpdate(); |
1350 |
Is posible to reduce the size of the picture to be shown in the bar's caption
axG2antt1.BeginUpdate(); axG2antt1.set_HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif"); axG2antt1.Columns.Add("Task"); axG2antt1.ScrollBySingleLine = true; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,78); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Default-Size"); var_Items.set_ItemHeight(h,48); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","<img>pic1</img>"); h = var_Items.AddItem("Custom-Size"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","<img>pic1:18</img>"); axG2antt1.EndUpdate(); |
1349 |
Is posible to reduce the size of the picture to be shown in the column's caption
axG2antt1.BeginUpdate(); axG2antt1.set_HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif"); axG2antt1.HeaderHeight = 48; (axG2antt1.Columns.Add("DefaultSize") as EXG2ANTTLib.Column).HTMLCaption = "Default-Size <img>pic1</img> Picture"; (axG2antt1.Columns.Add("CustomSize") as EXG2ANTTLib.Column).HTMLCaption = "Custom-Size <img>pic1:16</img> Picture"; axG2antt1.EndUpdate(); |
1348 |
Is it possible to display the selected dates using a solid color instead vertical lines
|
1347 |
How can I show the cells using a different background color based on the condition I have
axG2antt1.BeginUpdate(); axG2antt1.SelBackMode = EXG2ANTTLib.BackModeEnum.exTransparent; axG2antt1.ShowFocusRect = false; EXG2ANTTLib.ConditionalFormats var_ConditionalFormats = axG2antt1.ConditionalFormats; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat = var_ConditionalFormats.Add("dbl(%1)-dbl(%0) = 1",null); var_ConditionalFormat.BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_ConditionalFormat.ApplyTo = (EXG2ANTTLib.FormatApplyToEnum)0x1; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat1 = var_ConditionalFormats.Add("dbl(%0)-dbl(%1) = 3",null); var_ConditionalFormat1.BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,255,0)); var_ConditionalFormat1.ApplyTo = EXG2ANTTLib.FormatApplyToEnum.exFormatToColumns; EXG2ANTTLib.ConditionalFormat var_ConditionalFormat2 = var_ConditionalFormats.Add("dbl(%1)-dbl(%0) = 4",null); var_ConditionalFormat2.ForeColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(128,128,128)); var_ConditionalFormat2.Bold = true; var_ConditionalFormat2.ApplyTo = EXG2ANTTLib.FormatApplyToEnum.exFormatToItems; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; (var_Columns.Add("C1") as EXG2ANTTLib.Column).Width = 8; (var_Columns.Add("C2") as EXG2ANTTLib.Column).Width = 8; var_Columns.Add(""); axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem(2),1,3); var_Items.set_CellValue(var_Items.AddItem(5),1,2); var_Items.set_CellValue(var_Items.AddItem(5),1,6); var_Items.set_CellValue(var_Items.AddItem(2),1,6); axG2antt1.EndUpdate(); |
1346 |
How can I specify the frame's color for all Task bars
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.Bars["Task"].set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,255); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); axG2antt1.EndUpdate(); |
1345 |
Is it possible to change the bar's frame color
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 25; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; var_Chart.NonworkingDays = 0; var_Chart.Bars["Task"].Height = 15; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Default"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); h = var_Items.AddItem("Red-Frame"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,255); h = var_Items.AddItem("Green-ThickFrame"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern,4099); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,32768); h = var_Items.AddItem("Red-ThickFrame/Shadow"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern,12291); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,255); axG2antt1.EndUpdate(); |
1344 |
I need to customize the labels on the chart. Is it possible
|
1343 |
Is it possible to show a frame around the bar
axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 25; EXG2ANTTLib.Appearance var_Appearance = axG2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAEGg4BOUMQAAYAQGKIYBkAKBQAGaAoDDYMgzQwAAxDELMEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIyAJIcaw0GSEZwgOQZB" + "iOEYnDANkIYJDSIYHTZIUzTJAdGSVJKNKAoKCaEgORo5SpNUghBDYKQTJyeagkaaRVCWLplRCNIwWNJdVwjEaQaaiarKNqKNpSViAEqSdKEZRLOyRZyiKQMEreY4EUDQ" + "cxUPYMNYaAC6AAparpbwCFpSYpRND3TaEE4jSLKAA0HD6QqebIDDJaFq6PbVXSTOLPNhgPQcWxeVJBXjLExUALGSYLC6nKayHZcHACKK5VbVW6ZZDdNy/BLQeD4QANG4" + "riuNJriMV4dgWVgHh+ZpgCeEIQEQJIgGkMYdA6JwjC0VAAmaJgQgmPp4lCWgSCiaB+DKIYIjqQpllMf6JgYAoAmASAWAaAZggQDJ/gKYJIDYDoDmECBGAOBBhEgVgUgS" + "YRoGYGYGCGKB2BCBwhmiBgLggIgoHoJIJGGKIeCiBYiiiLgXgCIpohoMIMGKGJODSCwghiZg6g6Y5InYPh/lAECAg"); var_Appearance.Add(2,"CP:1 2 2 -2 -2"); var_Appearance.Add(3,"CP:1 -5 -5 5 5"); var_Appearance.Add(4,"XP:Window 19 1"); var_Appearance.Add(5,"XP:TreeView 2 1"); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exHLines; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Default"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); h = var_Items.AddItem("Red-Frame"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,255); h = var_Items.AddItem("Green-ThickFrame"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern,4099); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,32768); h = var_Items.AddItem("Red-ThickFrame/Shadow"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarPattern,12291); var_Items.set_ItemBar(h,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,255); h = var_Items.AddItem("EBN-Frame-Border"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_ItemBar(h,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,16777216); h = var_Items.AddItem("EBN-Inside Frame"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ItemBar(h,"K3",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554432); h = var_Items.AddItem("EBN-Outside Frame"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/18/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K4",null); var_Items.set_ItemBar(h,"K4",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,50331648); h = var_Items.AddItem("EBN-XP Close Button"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/18/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K5",null); var_Items.set_ItemBar(h,"K5",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,67108864); h = var_Items.AddItem("EBN-XP TreeView Glyph"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/18/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K6",null); var_Items.set_ItemBar(h,"K6",EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,83886080); axG2antt1.EndUpdate(); |
1342 |
Currently your control, provides customization up to Year,Month,Day,Hours,etc. I would like to add Shifts in a day. Shortly, I need to customize the chart's header. Is it possible
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("7/1/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AdjustLevelsToBase = true; var_Chart.set_PaneWidth(false,0); var_Chart.LevelCount = 2; EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0); var_Level.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Level.Label = "<b><%d%> - <%mmmm%> - <%yyyy%>"; var_Level.Unit = EXG2ANTTLib.UnitEnum.exDay; EXG2ANTTLib.Level var_Level1 = var_Chart.get_Level(1); var_Level1.Label = "<%h%>"; var_Level1.Count = 8; var_Level1.Unit = EXG2ANTTLib.UnitEnum.exHour; var_Level1.set_ReplaceLabel(0.ToString()," Shift 1"); var_Level1.set_ReplaceLabel(8.ToString()," Shift 2"); var_Level1.set_ReplaceLabel(16.ToString()," Shift 3"); var_Chart.UnitWidth = 48; var_Chart.NonworkingDays = 0; axG2antt1.EndUpdate(); |
1341 |
The exbartootip shows dates after you moved or resized the bar. My question is during the move or resizing of bar(you click on bar and drag it,during that time) , can we display the new dates simultaneously so we will know where we want to move or resize the bar to
axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,64); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.DrawDateTicker = true; var_Chart.DateTickerLabel = "<%mmm%> <%d%><br><b><%yyyy%>"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Tasks A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_SelectableItem(var_Items.AddItem(null),false); h = var_Items.AddItem("Tasks B"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); |
1340 |
Is it possible to assign a tooltip automatically to all bars, so it can display the start and end, without specifying the IexBarToolTip for each bar
axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,64); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.Bars["Task"].set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip,"<b><%=%9 + '/' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Tasks A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); h = var_Items.AddItem("Tasks B"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/11/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); |
1339 |
How can I change the color, font, bold etc for the items/cells in the same column or for the entire column
axG2antt1.BeginUpdate(); EXG2ANTTLib.ConditionalFormat var_ConditionalFormat = axG2antt1.ConditionalFormats.Add("1",null); var_ConditionalFormat.Bold = true; var_ConditionalFormat.ForeColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0)); var_ConditionalFormat.ApplyTo = (EXG2ANTTLib.FormatApplyToEnum)0x1; axG2antt1.Columns.Add("C1"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("C2") as EXG2ANTTLib.Column); var_Column.HeaderBold = true; var_Column.HTMLCaption = "<fgcolor=FF0000>C2"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem(10),1,11); var_Items.set_CellValue(var_Items.AddItem(12),1,13); axG2antt1.EndUpdate(); |
1338 |
How can I remove a date-time zone
|
1337 |
How can I filter the check-boxes (method 2)
EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Check") as EXG2ANTTLib.Column); EXG2ANTTLib.Editor var_Editor = var_Column.Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.CheckValueType; var_Editor.set_Option(EXG2ANTTLib.EditorOptionEnum.exCheckValue2,1); var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.CustomFilter = "checked||-1|||unchecked||0"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(true); var_Items.AddItem(true); var_Items.AddItem(false); var_Items.AddItem(true); var_Items.AddItem(false); var_Items.AddItem(true); var_Items.AddItem(false); |
1336 |
How can I filter the check-boxes (method 1)
EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Check") as EXG2ANTTLib.Column); EXG2ANTTLib.Editor var_Editor = var_Column.Editor; var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.CheckValueType; var_Editor.set_Option(EXG2ANTTLib.EditorOptionEnum.exCheckValue2,1); var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.FilterType = EXG2ANTTLib.FilterTypeEnum.exCheck; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(true); var_Items.AddItem(true); var_Items.AddItem(false); var_Items.AddItem(true); var_Items.AddItem(false); var_Items.AddItem(true); var_Items.AddItem(false); |
1335 |
How can add a button to control
// ButtonClick event - Occurs when user clicks on the cell's button. private void axG2antt1_ButtonClick(object sender, AxEXG2ANTTLib._IG2anttEvents_ButtonClickEvent e) { System.Diagnostics.Debug.Print( "ButtonClick" ); System.Diagnostics.Debug.Print( axG2antt1.Items.get_CellCaption(e.item,e.colIndex) ); System.Diagnostics.Debug.Print( e.key.ToString() ); } //this.axG2antt1.ButtonClick += new AxEXG2ANTTLib._IG2anttEvents_ButtonClickEventHandler(this.axG2antt1_ButtonClick); axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 22; axG2antt1.HeaderHeight = 22; axG2antt1.Appearance = EXG2ANTTLib.AppearanceEnum.None2; axG2antt1.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines; axG2antt1.ScrollBySingleLine = false; axG2antt1.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="); axG2antt1.set_HTMLPicture("pic1","c:\\exontrol\\images\\auction.gif"); axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; EXG2ANTTLib.Column var_Column = (var_Columns.Add("Type") as EXG2ANTTLib.Column); var_Column.Width = 48; var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("Appearance") as EXG2ANTTLib.Column); var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column1.Alignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Column1.HeaderAlignment = EXG2ANTTLib.AlignmentEnum.CenterAlignment; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Items.<b>CellHasButton</b> property"); var_Items.set_CellValue(h,1,"Button <b>1</b>"); var_Items.set_CellHasButton(h,1,true); h = var_Items.AddItem("Items.<b>CellButtonAutoWidth</b> property"); var_Items.set_CellValue(h,1," Button <b>2</b> "); var_Items.set_CellHasButton(h,1,true); var_Items.set_CellButtonAutoWidth(h,1,true); h = var_Items.AddItem("Items.<b>CellHasButton</b> property"); var_Items.set_CellValue(h,1," <img>2</img>Button <b>3</b> "); var_Items.set_CellHasButton(h,1,true); var_Items.set_CellButtonAutoWidth(h,1,true); h = var_Items.AddItem("Items.<b>CellHasButton</b> property"); var_Items.set_ItemHeight(h,32); var_Items.set_CellValue(h,1," <img>2</img>Button <b>4</b> <img>pic1</img> "); var_Items.set_CellHasButton(h,1,true); var_Items.set_CellButtonAutoWidth(h,1,true); h = var_Items.AddItem("Items.<b>CellHasButton</b> in splitted cells"); var_Items.set_CellValue(h,1," Button <b>5.1</b> "); var_Items.set_CellHasButton(h,1,true); var_Items.set_CellButtonAutoWidth(h,1,true); object s = var_Items.get_SplitCell(h,1); var_Items.set_CellValue(0,s," Button <b>5.2</b> "); var_Items.set_CellHasButton(0,s,true); var_Items.set_CellButtonAutoWidth(0,s,true); h = var_Items.AddItem("Column.<b>Editor</b>, Items.<b>CellEditor</b>"); var_Items.set_CellValue(h,1,"Visible when clicking the cell"); EXG2ANTTLib.Editor var_Editor = var_Items.get_CellEditor(h,1); var_Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType; var_Editor.AddButton("B1",1,0,"This is a bit of text that's shown when the cursor hovers the button B1",null,null); var_Editor.AddButton("B3",2,1,"This is a bit of text that's shown when the cursor hovers the button B3",null,null); var_Editor.AddButton("B4",1,1,"This is a bit of text that's shown when the cursor hovers the button B4",null,null); var_Editor.ButtonWidth = 24; h = var_Items.AddItem("Column.<b>Editor</b>, Items.<b>CellEditor</b>"); var_Items.set_CellValue(h,1,3); EXG2ANTTLib.Editor var_Editor1 = var_Items.get_CellEditor(h,1); var_Editor1.EditType = EXG2ANTTLib.EditTypeEnum.CheckListType; var_Editor1.AddItem(1,"Flag 1",null); var_Editor1.AddItem(2,"Flag 2",null); var_Editor1.AddItem(4,"Flag 4",null); var_Editor1.AddItem(8,"Flag 8",null); var_Editor1.AddButton("C1",1,0,"This is a bit of text that's shown when the cursor hovers the button C1",null,null); var_Editor1.AddButton("C3",2,0,"This is a bit of text that's shown when the cursor hovers the button C2",null,null); var_Editor1.AddButton("C4",1,0,"This is a bit of text that's shown when the cursor hovers the button C3",null,null); var_Editor1.ButtonWidth = 24; axG2antt1.EndUpdate(); |
1334 |
Is it posible to store additional values against each item, cell, bar, link, such as custom values such string / numbers etc
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); (axG2antt1.Columns.Add("Column") as EXG2ANTTLib.Column).Data = "Extra_Data_Column"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Item 1"); var_Items.set_ItemData(h,"Extra_Data_Item 1"); var_Items.set_CellData(h,0,"Extra_Data_Item 1_Cell_0"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B1",null); var_Items.set_ItemBar(h,"B1",EXG2ANTTLib.ItemBarPropertyEnum.exBarData,"Extra_B1_Data"); h = var_Items.AddItem("Item 2"); var_Items.set_ItemData(h,"Extra_Data_Item 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B2",null); var_Items.set_ItemBar(h,"B2",EXG2ANTTLib.ItemBarPropertyEnum.exBarData,"Extra_B2_Data"); var_Items.AddLink("L1",var_Items.get_FindItem("Item 1",0,null),"B1",var_Items.get_FindItem("Item 2",0,null),"B2"); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkUserData,"Extra_Link_Data"); |
1333 |
How do I set the parent item to show the total number of days for its children and also the minimum and maximum dates for its children
axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; axG2antt1.Indent = 11; axG2antt1.HasLines = EXG2ANTTLib.HierarchyLineEnum.exSolidLine; axG2antt1.Items.AllowCellValueToItemBar = true; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Tasks"); (var_Columns.Add("Start") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); (var_Columns.Add("End") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); (var_Columns.Add("Duration") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,513); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.ShowNonworkingDates = false; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowLinkBars = false; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,220); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Project"); var_Items.AddBar(h,"Summary",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/3/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h1 = var_Items.InsertItem(h,null,"Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h2 = var_Items.InsertItem(h,null,"Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h3 = var_Items.InsertItem(h,null,"Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/3/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.DefineSummaryBars(h,"",h1,""); var_Items.DefineSummaryBars(h,"",h2,""); var_Items.DefineSummaryBars(h,"",h3,""); var_Items.set_ExpandItem(h,true); var_Items.set_ItemBold(h,true); axG2antt1.EndUpdate(); |
1332 |
Is it possible to specify the distance between 2 bars to be at least 2 working days
// BarResizing event - Occurs when a bar is moving or resizing. private void axG2antt1_BarResizing(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent e) { axG2antt1.Items.SchedulePDM(e.item,e.key); } //this.axG2antt1.BarResizing += new AxEXG2ANTTLib._IG2anttEvents_BarResizingEventHandler(this.axG2antt1_BarResizing); axG2antt1.BeginUpdate(); axG2antt1.DefaultItemHeight = 24; axG2antt1.AntiAliasing = true; axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; EXG2ANTTLib.Bar var_Bar = var_Chart.Bars.Add("Task:Split"); var_Bar.Shortcut = "Task"; var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,0)); var_Bar.Height = 17; var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternFrameShadow; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.LinksWidth = 2; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.AllowLinkBars = false; var_Chart.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday; var_Chart.NonworkingDaysPattern = EXG2ANTTLib.PatternEnum.exPatternBDiagonal; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h1,"K1",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_ItemBar(h2,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,-1); var_Items.set_Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkColor,8421504); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ItemBar(h3,"K3",EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkText,"<br><br><br><br>This link <u>delays</u> the bars<br>with <b>2</b> working days"); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkPDMWorkingDelay,2); var_Items.set_Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,-1); var_Items.SchedulePDM(0,"K1"); axG2antt1.EndUpdate(); |
1331 |
The item is not getting selected when clicking the cell's checkbox. What should I do
// CellStateChanged event - Fired after cell's state has been changed. private void axG2antt1_CellStateChanged(object sender, AxEXG2ANTTLib._IG2anttEvents_CellStateChangedEvent e) { axG2antt1.Items.set_SelectItem(e.item,true); } //this.axG2antt1.CellStateChanged += new AxEXG2ANTTLib._IG2anttEvents_CellStateChangedEventHandler(this.axG2antt1_CellStateChanged); (axG2antt1.Columns.Add("Check") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(0); var_Items.AddItem(1); var_Items.AddItem(2); var_Items.AddItem(3); |
1330 |
How can I add a summary item as a child or subitem of another one
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.set_PaneWidth(false,96); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; axG2antt1.Columns.Add("Default"); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Project"); var_Items.AddBar(hSummary,"Summary",Convert.ToDateTime("1/1/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/1/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"Sum",null); int hChild = var_Items.InsertItem(hSummary,0,"Task 1"); var_Items.AddBar(hChild,"Task",Convert.ToDateTime("1/2/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"Task1",null); var_Items.DefineSummaryBars(hSummary,"Sum",hChild,"Task1"); hChild = var_Items.InsertItem(hSummary,0,"Task 2"); var_Items.AddBar(hChild,"Task",Convert.ToDateTime("1/4/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"Task2",null); var_Items.DefineSummaryBars(hSummary,"Sum",hChild,"Task2"); hChild = var_Items.InsertItem(hSummary,0,"Task 3"); var_Items.AddBar(hChild,"Task",Convert.ToDateTime("1/6/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"Task3",null); var_Items.DefineSummaryBars(hSummary,"Sum",hChild,"Task3"); var_Items.set_ExpandItem(hSummary,true); axG2antt1.EndUpdate(); |
1329 |
How can I make an item a subitem of another one
axG2antt1.BeginUpdate(); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.Columns.Add("Default"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int hSummary = var_Items.AddItem("Project"); int hChild = var_Items.InsertItem(hSummary,0,"Task 1"); hChild = var_Items.InsertItem(hSummary,0,"Task 2"); hChild = var_Items.InsertItem(hSummary,0,"Task 3"); var_Items.set_ExpandItem(hSummary,true); axG2antt1.EndUpdate(); |
1328 |
Is it possible to move a bar per drag and drop to another owner/item
axG2antt1.BeginUpdate(); (axG2antt1.Columns.Add("Members") as EXG2ANTTLib.Column).set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowLinkBars = false; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.AllowSelectObjects = EXG2ANTTLib.SelectObjectsEnum.exNoSelectObjects; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,96); var_Chart.Bars["Task"].OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Member <b>1</b>"); var_Items.AddBar(h,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T102","Task <b>102</b>"); var_Items.set_ItemBar(h,"T102",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.set_ItemBar(h,"T102",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,true); h = var_Items.AddItem("Member <b>2</b>"); h = var_Items.AddItem("Member <b>3</b>"); h = var_Items.AddItem("Member <b>4</b>"); var_Items.AddBar(h,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T103","Task <b>103</b>"); var_Items.set_ItemBar(h,"T103",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.set_ItemBar(h,"T103",EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMoveToAnother,true); axG2antt1.EndUpdate(); |
1327 |
I have the chart displaying days, is it possible to display bars/tasks up to hours so inside days somehow
axG2antt1.BeginUpdate(); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.UnitWidth = 38; var_Chart.set_PaneWidth(false,28); var_Chart.FirstVisibleDate = Convert.ToDateTime("3/4/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour; axG2antt1.Columns.Add("Default"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("ASS"),"Task",Convert.ToDateTime("3/7/2011",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("3/7/2011 3:30:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("EMB"),"Task",Convert.ToDateTime("3/7/2011 3:30:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("3/8/2011 9:15:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("TES"),"Task",Convert.ToDateTime("3/8/2011 9:15:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("3/8/2011 13:45:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); axG2antt1.EndUpdate(); |
1326 |
Is it possible to limit the height of the item while resizing
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void axG2antt1_AddItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AddItemEvent e) { axG2antt1.Items.set_ItemMinHeight(e.item,18); axG2antt1.Items.set_ItemMaxHeight(e.item,72); } //this.axG2antt1.AddItem += new AxEXG2ANTTLib._IG2anttEvents_AddItemEventHandler(this.axG2antt1_AddItem); axG2antt1.BeginUpdate(); axG2antt1.ItemsAllowSizing = EXG2ANTTLib.ItemsAllowSizingEnum.exResizeItem; axG2antt1.ScrollBySingleLine = false; axG2antt1.BackColorAlternate = Color.FromArgb(240,240,240); axG2antt1.Columns.Add("Names"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("Mantel"); var_Items.AddItem("Mechanik"); var_Items.AddItem("Motor"); var_Items.AddItem("Murks"); var_Items.AddItem("Märchen"); var_Items.AddItem("Möhren"); var_Items.AddItem("Mühle"); axG2antt1.Columns[0].SortOrder = EXG2ANTTLib.SortOrderEnum.SortAscending; axG2antt1.EndUpdate(); |
1325 |
Is it possible to copy the hierarchy of the control using the GetItems method
axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.Columns.Add("Def"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); axG2antt1.PutItems(axG2antt1.GetItems(-1),null); |
1324 |
I have found a property ReadOnly but this doesn't work correctly. I need the chart part of the control to be readonly too. Is it possible
axG2antt1.ReadOnly = EXG2ANTTLib.ReadOnlyEnum.exReadOnly; EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.BarsAllowSizing = false; var_Chart.AllowLinkBars = false; |
1323 |
How can I select a column
// MouseDown event - Occurs when the user presses a mouse button. private void axG2antt1_MouseDownEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseDownEvent e) { axG2antt1.BeginUpdate(); axG2antt1.Columns[axG2antt1.get_ColumnFromPoint(e.x,e.y)].Selected = true; axG2antt1.Items.SelectAll(); axG2antt1.EndUpdate(); } //this.axG2antt1.MouseDownEvent += new AxEXG2ANTTLib._IG2anttEvents_MouseDownEventHandler(this.axG2antt1_MouseDownEvent); axG2antt1.BeginUpdate(); axG2antt1.MarkSearchColumn = false; axG2antt1.SingleSel = false; axG2antt1.FullRowSelect = EXG2ANTTLib.CellSelectEnum.exRectSel; axG2antt1.SortOnClick = EXG2ANTTLib.SortOnClickEnum.exNoSort; EXG2ANTTLib.Columns var_Columns = axG2antt1.Columns; var_Columns.Add("Column1"); var_Columns.Add("Column2"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.set_CellValue(var_Items.AddItem("One"),1,"One"); var_Items.set_CellValue(var_Items.AddItem("Two"),1,"Two"); axG2antt1.EndUpdate(); |
1322 |
I have several columns, but noticed that the filter is using AND between columns, but I need OR clause for filtering. Is it possible
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Item") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.Filter = "Child 1"; var_Column.FilterType = EXG2ANTTLib.FilterTypeEnum.exFilter; EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add("Date") as EXG2ANTTLib.Column); var_Column1.DisplayFilterButton = true; var_Column1.DisplayFilterPattern = false; var_Column1.DisplayFilterDate = true; var_Column1.FilterList = EXG2ANTTLib.FilterListEnum.exShowExclude | EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exShowCheckBox | EXG2ANTTLib.FilterListEnum.exNoItems; var_Column1.Filter = Convert.ToDateTime("12/28/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US")).ToString(); var_Column1.FilterType = EXG2ANTTLib.FilterTypeEnum.exDate; axG2antt1.FilterCriteria = "%0 or %1"; axG2antt1.set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarOr,"<font ;18><fgcolor=FF0000>or</fgcolor></font>"); axG2antt1.set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,"<font ;18><fgcolor=FF0000>and</fgcolor></font>"); EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.set_CellValue(var_Items.InsertItem(h,null,"Child 1"),1,Convert.ToDateTime("12/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_CellValue(var_Items.InsertItem(h,null,"Child 2"),1,Convert.ToDateTime("12/28/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.set_CellValue(var_Items.InsertItem(h,null,"Child 1"),1,Convert.ToDateTime("12/29/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_CellValue(var_Items.InsertItem(h,null,"Child 2"),1,Convert.ToDateTime("12/30/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); axG2antt1.ApplyFilter(); axG2antt1.EndUpdate(); |
1321 |
Is it possible exclude the dates being selected in the drop down filter window
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Date") as EXG2ANTTLib.Column); var_Column.SortType = EXG2ANTTLib.SortTypeEnum.SortDate; var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.DisplayFilterDate = true; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exShowExclude | EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exShowCheckBox | EXG2ANTTLib.FilterListEnum.exNoItems; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(Convert.ToDateTime("12/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/28/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/29/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/30/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/31/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); axG2antt1.EndUpdate(); |
1320 |
How can I display a calendar control inside the drop down filter window
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Date") as EXG2ANTTLib.Column); var_Column.SortType = EXG2ANTTLib.SortTypeEnum.SortDate; var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.DisplayFilterDate = true; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exShowCheckBox | EXG2ANTTLib.FilterListEnum.exNoItems; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(Convert.ToDateTime("12/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/28/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/29/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/30/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/31/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); axG2antt1.EndUpdate(); |
1319 |
Is it possible to include the dates as checkb-boxes in the drop down filter window
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Dates") as EXG2ANTTLib.Column); var_Column.SortType = EXG2ANTTLib.SortTypeEnum.SortDate; var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = true; var_Column.DisplayFilterDate = true; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exShowCheckBox; var_Column.Filter = "to 12/27/2010"; var_Column.FilterType = EXG2ANTTLib.FilterTypeEnum.exDate; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(Convert.ToDateTime("12/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/28/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/29/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/30/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/31/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); axG2antt1.ApplyFilter(); axG2antt1.EndUpdate(); |
1318 |
How can I filter items for dates before a specified date
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Dates") as EXG2ANTTLib.Column); var_Column.SortType = EXG2ANTTLib.SortTypeEnum.SortDate; var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = true; var_Column.DisplayFilterDate = true; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exNoItems; var_Column.Filter = "to 12/27/2010"; var_Column.FilterType = EXG2ANTTLib.FilterTypeEnum.exDate; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(Convert.ToDateTime("12/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/28/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/29/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/30/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/31/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); axG2antt1.ApplyFilter(); axG2antt1.EndUpdate(); |
1317 |
Is it possible to filter dates
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Dates") as EXG2ANTTLib.Column); var_Column.SortType = EXG2ANTTLib.SortTypeEnum.SortDate; var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = true; var_Column.DisplayFilterDate = true; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exNoItems; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem(Convert.ToDateTime("12/27/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/28/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/29/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/30/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddItem(Convert.ToDateTime("12/31/2010",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); axG2antt1.EndUpdate(); |
1316 |
Is it possible to change the Exclude field name to something different, in the drop down filter window
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarExclude,"Leaving out"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Items") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exShowExclude | EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exShowCheckBox; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); axG2antt1.EndUpdate(); |
1315 |
How can I display the Exclude field in the drop down filter window
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Items") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exShowExclude | EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exShowCheckBox; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); axG2antt1.EndUpdate(); |
1314 |
Is it possible to show and ensure the focused item from the control, in the drop down filter window
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Items") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exShowFocusItem | EXG2ANTTLib.FilterListEnum.exShowCheckBox; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.set_SelectItem(var_Items.InsertItem(h,null,"Child 2"),true); var_Items.set_ExpandItem(h,true); axG2antt1.EndUpdate(); |
1313 |
Is it possible to show only blanks items with no listed items from the control
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Items") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exShowBlanks | EXG2ANTTLib.FilterListEnum.exNoItems; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); axG2antt1.EndUpdate(); |
1312 |
How can I include the blanks items in the drop down filter window
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Items") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exShowBlanks | EXG2ANTTLib.FilterListEnum.exShowCheckBox; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); axG2antt1.EndUpdate(); |
1311 |
How can I select multiple items in the drop down filter window, using check-boxes
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Items") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exShowCheckBox; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); axG2antt1.EndUpdate(); |
1310 |
Is it possible to allow a single item being selected in the drop down filter window
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Items") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = false; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exSingleSel; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); axG2antt1.EndUpdate(); |
1309 |
How can I display no (All) item in the drop down filter window
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAll,""); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Items") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = true; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exNoItems; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); axG2antt1.EndUpdate(); |
1308 |
Is it possible to display no items in the drop down filter window, so only the pattern is visible
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Items") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.DisplayFilterPattern = true; var_Column.FilterList = EXG2ANTTLib.FilterListEnum.exNoItems; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); axG2antt1.EndUpdate(); |
1307 |
How can I specify the time-scale available when zoom-in/zoom-out or enlarging the chart
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.ShowNonworkingDates = false; var_Chart.LevelCount = 3; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.AllowResizeChart = EXG2ANTTLib.ResizeChartEnum.exAllowChangeUnitScale | EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle | EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader; var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exHour,""); var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exMinute,""); var_Chart.set_Label(EXG2ANTTLib.UnitEnum.exSecond,""); EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task B"),"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task C"),"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem(""),"",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"Info","Click the <b>middle</b> mouse button and start dragging"); axG2antt1.EndUpdate(); |
1306 |
How can I enable zoom-in/zoom-out or enlarging the chart, using the mouse middle button
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.ShowNonworkingDates = false; var_Chart.LevelCount = 3; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.AllowResizeChart = EXG2ANTTLib.ResizeChartEnum.exAllowChangeUnitScale | EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle | EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task B"),"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task C"),"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem(""),"",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"Info","Click the <b>middle</b> mouse button and start dragging"); axG2antt1.EndUpdate(); |
1305 |
How can I enable zoom-in/zoom-out or enlarging, using the chart's header
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.ShowNonworkingDates = false; var_Chart.LevelCount = 3; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.AllowResizeChart = EXG2ANTTLib.ResizeChartEnum.exAllowChangeUnitScale | EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task B"),"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task C"),"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); axG2antt1.EndUpdate(); |
1304 |
How can I enable resizing the chart, using the mouse middle button
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.ShowNonworkingDates = false; var_Chart.LevelCount = 3; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.AllowResizeChart = EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle | EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader; var_Chart.MaxUnitWidth = 128; var_Chart.MinUnitWidth = 8; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task B"),"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task C"),"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem(""),"",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"Info","Click the <b>middle</b> mouse button and start dragging"); axG2antt1.EndUpdate(); |
1303 |
How can I enable resizing the chart, using the chart's header
axG2antt1.BeginUpdate(); axG2antt1.Columns.Add("Task"); EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.ShowNonworkingDates = false; var_Chart.LevelCount = 3; var_Chart.UnitScale = EXG2ANTTLib.UnitEnum.exDay; var_Chart.AllowResizeChart = EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader; var_Chart.MaxUnitWidth = 128; var_Chart.MinUnitWidth = 8; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task B"),"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task C"),"Task",Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); axG2antt1.EndUpdate(); |
1302 |
Is it possible to auto-numbering the children items but still keeps the position after filtering
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Items") as EXG2ANTTLib.Column); var_Column.DisplayFilterButton = true; var_Column.FilterType = EXG2ANTTLib.FilterTypeEnum.exFilter; var_Column.Filter = "Child 2"; EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add("Pos.1") as EXG2ANTTLib.Column); var_Column1.FormatColumn = "1 ropos ''"; var_Column1.Position = 0; var_Column1.Width = 32; var_Column1.AllowSizing = false; EXG2ANTTLib.Column var_Column2 = (axG2antt1.Columns.Add("Pos.2") as EXG2ANTTLib.Column); var_Column2.FormatColumn = "1 ropos ':'"; var_Column2.Position = 1; var_Column2.Width = 32; var_Column2.AllowSizing = false; EXG2ANTTLib.Column var_Column3 = (axG2antt1.Columns.Add("Pos.3") as EXG2ANTTLib.Column); var_Column3.FormatColumn = "1 ropos ':|A-Z'"; var_Column3.Position = 2; var_Column3.Width = 32; var_Column3.AllowSizing = false; EXG2ANTTLib.Column var_Column4 = (axG2antt1.Columns.Add("Pos.4") as EXG2ANTTLib.Column); var_Column4.FormatColumn = "1 ropos '|A-Z|'"; var_Column4.Position = 3; var_Column4.Width = 32; var_Column4.AllowSizing = false; EXG2ANTTLib.Column var_Column5 = (axG2antt1.Columns.Add("Pos.5") as EXG2ANTTLib.Column); var_Column5.FormatColumn = "'<font Tahoma;7>' + 1 ropos '-<b>||A-Z'"; var_Column5.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column5.Position = 4; var_Column5.Width = 32; var_Column5.AllowSizing = false; EXG2ANTTLib.Column var_Column6 = (axG2antt1.Columns.Add("Pos.6") as EXG2ANTTLib.Column); var_Column6.FormatColumn = "'<b>'+ 1 ropos '</b>:<fgcolor=FF0000>|A-Z|'"; var_Column6.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column6.Position = 5; var_Column6.Width = 48; var_Column6.AllowSizing = false; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); axG2antt1.ApplyFilter(); axG2antt1.EndUpdate(); |
1301 |
Is it possible to auto-numbering the children items too
axG2antt1.BeginUpdate(); axG2antt1.Chart.set_PaneWidth(true,0); axG2antt1.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; axG2antt1.Columns.Add("Items"); EXG2ANTTLib.Column var_Column = (axG2antt1.Columns.Add("Pos.1") as EXG2ANTTLib.Column); var_Column.FormatColumn = "1 rpos ''"; var_Column.Position = 0; var_Column.Width = 32; var_Column.AllowSizing = false; EXG2ANTTLib.Column var_Column1 = (axG2antt1.Columns.Add("Pos.2") as EXG2ANTTLib.Column); var_Column1.FormatColumn = "1 rpos ':'"; var_Column1.Position = 1; var_Column1.Width = 32; var_Column1.AllowSizing = false; EXG2ANTTLib.Column var_Column2 = (axG2antt1.Columns.Add("Pos.3") as EXG2ANTTLib.Column); var_Column2.FormatColumn = "1 rpos ':|A-Z'"; var_Column2.Position = 2; var_Column2.Width = 32; var_Column2.AllowSizing = false; EXG2ANTTLib.Column var_Column3 = (axG2antt1.Columns.Add("Pos.4") as EXG2ANTTLib.Column); var_Column3.FormatColumn = "1 rpos '|A-Z|'"; var_Column3.Position = 3; var_Column3.Width = 32; var_Column3.AllowSizing = false; EXG2ANTTLib.Column var_Column4 = (axG2antt1.Columns.Add("Pos.5") as EXG2ANTTLib.Column); var_Column4.FormatColumn = "'<font Tahoma;7>' + 1 rpos '-<b>||A-Z'"; var_Column4.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column4.Position = 4; var_Column4.Width = 32; var_Column4.AllowSizing = false; EXG2ANTTLib.Column var_Column5 = (axG2antt1.Columns.Add("Pos.6") as EXG2ANTTLib.Column); var_Column5.FormatColumn = "'<b>'+ 1 rpos '</b>:<fgcolor=FF0000>|A-Z|'"; var_Column5.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column5.Position = 5; var_Column5.Width = 48; var_Column5.AllowSizing = false; EXG2ANTTLib.Items var_Items = axG2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); axG2antt1.EndUpdate(); |